import axios from "@/model/axios";
import api from "@/model/traffic/api";

//首页轮播图
export const bannerList = () =>
  axios({
    method: "get",
    url: api.traffic.banner,
  });
//新增驾驶证
export const addlicense = (data) =>
  axios({
    method: "post",
    url: api.addtraffic.addlicense,
    data,
    headers: { Authorization: window.localStorage.getItem("token") },
  });

//2获取当前登录人绑定的驾驶证信息
export const GetLicense = () =>
  axios({
    method: "get",
    url: api.trafficget.getlicense,
    headers: { Authorization: window.localStorage.getItem("token") },
  });

//删除驾驶证
export const RemoveLicense = (id) =>
  axios({
    method: "delete",
    url: api.removetraffic.removelicense + id,

    headers: { Authorization: window.localStorage.getItem("token") },
  });
